{extend name="../../admin/view/main"}

{block name="button"}
<button data-table-id="BaseTable" data-modal='{:url("add")}?type={$type|default=""}'
        class='layui-btn layui-btn-sm layui-btn-primary'>创建任务
</button>
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white">
    <div class="layui-tab-content table-block">
        {include file='test_box/index_search'}
        <table class="layui-table" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th class='text-left'>ID</th>
                <th class='text-left'>来源用户ID</th>
                <th class='text-left'>名称</th>
                <th class="text-left">描述</th>
                <th class="text-left">标签</th>
                <th class="text-left">图片</th>
                <th class="text-left">Spin金额</th>
                <th class="text-left">商品总金额</th>
                <th class="text-left" style="width: 250px;">商品</th>
                <th class="text-left">是否热门</th>
                <th class="text-left">盒子状态</th>
                <th class="text-left" style="width: 240px;">操作</th>
                <th></th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
                </td>
                <td class='text-left '>{$vo.id|default=''}</td>
                <td class='text-left '>{$vo.from_user_id|default=''}</td>
                <td class='text-left '>{$vo.name|default=''}</td>
                <td class='text-left '>{$vo.description|default=''}</td>
                <td class='text-left '>{$vo.tags|default=''}</td>
                <td class='text-left '>
                    <img src="{$vo.image|default=''}" alt="Smiley face" width="60" height="60">
                </td>
                <td class='text-left '>{$vo.amount|default=''}</td>
                <td class='text-left '>{$vo.product_total_amount|default=''}</td>
                <td class='text-left ' style="width: 250px;">
                    {foreach $vo.show_products_image as $k=>$v}
                    {if $k gt 0}&nbsp;&nbsp;&nbsp;&nbsp; {/if}
                    <img src="{$v|default=''}" alt="Smiley face" width="60" height="60">
                    {/foreach}
                </td>
                <td class="text-left nowrap">
                    {if $vo.is_hot eq 1}<span class="color-blue">热门</span>
                    {elseif $vo.is_hot eq 2}<span class="color-green">非热门</span>
                    {/if}
                </td>
                <td class="text-left nowrap">
                    {if $vo.status eq 1}<span class="color-green">有效</span>
                    {elseif $vo.status eq 2}<span class="color-red">无效</span>
                    {/if}
                </td>
                <td class='text-left' style="width: 240px;">
                    <a class="layui-btn layui-btn-sm" data-modal="{:url('queryrtp')}?id={$vo.id}" data-title="查看RTP">{:lang("查看RTP")}</a>
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        <div style="margin-top: -5px;">{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
        </div>
    </div>
</div>
{/block}